package cn.edu.tju.elm.service;

import cn.edu.tju.elm.model.Cart;

import java.util.List;
import java.util.Optional;

public interface CartService {
    Optional<Cart> findById(Long id);
    List<Cart> findByCustomerId(Long customerId);
    Optional<Cart> findByCustomerIdAndFoodId(Long customerId, Long foodId);
    List<Cart> findByCustomerIdAndBusinessId(Long customerId, Long businessId);
    Cart save(Cart cart);
    void deleteById(Long id);
    void deleteByCustomerIdAndFoodId(Long customerId, Long foodId);
}